package com.atguigu.execle;

import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.context.AnalysisContext;
import com.atguigu.eud_teacher.dao.SubjectDao;

import java.util.ArrayList;
import java.util.List;

public class Easyexecle {
    private SubjectDao baseMapper;

    public static void main(String[] args) {

        String name = "D:\\subject.xlsx";
        EasyExcel.write(name, EasyData.class).sheet("课程信息").doWrite(getData());
//        EasyExcel.read(name,EasyData.class,new ReadListener()).sheet().doRead();
//        EasyExcel.read(name,EasyData.class,new ReadListener()).sheet().doRead();
        System.out.println(1);
    }


    private static List getData() {
        List<EasyData> list = new ArrayList<>();
        for (int i = 0; i <= 1000000; i++) {
            EasyData e = new EasyData();
            e.setOne("年龄");
            e.setTwo("1221");
            list.add(e);
        }
        return list;
    }


}